package com.icss.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import com.icss.entity.staff;
public interface staffDao {
	@Insert("insert into staff(staff_id,role_id,staff_name,staff_salary) values(default,#{0},#{1},#{2})")
	public int addstaff(int role_id,String staff_name,int staff_salary);
    @Select("select * from staff,role where staff.role_id=role.role_id ")
public List<staff> staffs();

@Update("update staff set staff_salary=#{0} where staff_id=#{1} ")
public int updatestaff(Integer staff_salary,Integer staff_id);
@Select ("select * from staff where staff_id=#{staff_id}")
public List<staff> updates(Integer staff_id);
@Delete("delete from staff where staff_id=#{staff_id}")
public int deletestaff(Integer staff_id);
}